<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport"
          content="width=device-width, user-scalable=no, initial-scale=1.0, maximum-scale=1.0, minimum-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>jsonPath</title>
    <link rel="stylesheet" href="../assets/global/plugins/layui/css/layui.css"/>
    <link rel="stylesheet" href="../assets/custom/css/changeother.css"/>
    <style>
        pre.showJson {
            font-family: "Courier New", Courier, monospace;
            background: #eed;
            border: 1px dotted #999;
            font-style: italic;
            color: darkred;
            margin-bottom: 10px;
        }
    </style>
</head>
<body>
<div class="contentPadding">
    <h3>
        Let's practice JSONPath expressions by some more examples. We start with a simple JSON structure built after an XML example representing a bookstore (original XML file).
    </h3>
    <pre class="showJson">
    { "store": {
    "book": [
      { "category": "reference",
        "author": "Nigel Rees",
        "title": "Sayings of the Century",
        "price": 8.95
      },
      { "category": "fiction",
        "author": "Evelyn Waugh",
        "title": "Sword of Honour",
        "price": 12.99
      },
      { "category": "fiction",
        "author": "Herman Melville",
        "title": "Moby Dick",
        "isbn": "0-553-21311-3",
        "price": 8.99
      },
      { "category": "fiction",
        "author": "J. R. R. Tolkien",
        "title": "The Lord of the Rings",
        "isbn": "0-395-19395-8",
        "price": 22.99
      }
    ],
    "bicycle": {
      "color": "red",
      "price": 19.95
    }
  }
}
</pre>
    <table class="layui-table" id="LAY_table_user" lay-filter="user"></table>
</div>

<script src="../assets/global/plugins/layui/layui.all.js"></script>
<script>
    layui.use('table', function(){
        var table = layui.table;
        //方法级渲染
        table.render({
            elem: '#LAY_table_user'
            ,url: 'layui_table.json'
            ,cols: [[
                {checkbox: true}
                ,{field:'id', title: '流程名称', minWidth:80,}
                ,{field:'username', title: '来源数据对象名', minWidth:80}
                ,{field:'sex', title: '来源表名', minWidth:80,}
                ,{field:'city', title: '来源数据源', minWidth:80}
                ,{field:'sign', title: '抽取方式', minWidth:80}
                ,{field:'experience', title: '运行频率', minWidth:80}
                ,{field:'score', title: '最后启动时间', minWidth:80}
                ,{field:'classify', title: '启用否', minWidth:80}
                ,{field:'wealth', title: '运行状态', minWidth:80}
                ,{width:200, align:'center', toolbar: '#barDemo',title:'操作'}
            ]]
            ,id: 'testReload'
            ,page: false
            ,height: 'full-496'
        });

    });
</script>
</body>
</html>
